package validate

import (
	"github.com/gin-gonic/gin"
	"github.com/thedevsaddam/govalidator"
)

type PaintingForm struct {
	Prompt         string `json:"prompt,omitempty" validate:"prompt"`
	NegativePrompt string `json:"negative_prompt,omitempty" validate:"negative_prompt"`
	Style          string `json:"style,omitempty" validate:"style"`
	Size           string `json:"size,omitempty" validate:"size"`
}

func ValidatePainting(data interface{}, c *gin.Context) map[string][]string {
	rules := govalidator.MapData{
		"prompt": []string{"required"},
		"size":   []string{"required"},
	}

	message := govalidator.MapData{
		"prompt": []string{"required:Prompt is required"},
		"size":   []string{"required:Size is required"},
	}

	return validate(data, rules, message)
}
